<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>选择文章</title>
<link href="css_body.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="main.js"></script>
<script language="javascript">
//获得选中文件的文件名
function getCheckboxItem()
{
	var allSel="";
	if(document.form2.arcID.value) return document.form2.arcID.value;
	for(i=0;i<document.form2.arcID.length;i++)
	{
		if(document.form2.arcID[i].checked)
		{
			if(allSel=="")
				allSel = document.form2.arcID[i].value;
			else
				allSel = allSel+","+document.form2.arcID[i].value;
		}
	}
	return allSel;	
}
function selAll()
{
	for(i=0;i<document.form2.arcID.length;i++)
	{
		if(!document.form2.arcID[i].checked)
		{
			document.form2.arcID[i].checked=true;
		}
	}
}
function noSelAll()
{
	for(i=0;i<document.form2.arcID.length;i++)
	{
		if(document.form2.arcID[i].checked)
		{
			document.form2.arcID[i].checked=false;
		}
	}
}
function ReturnValue()
{
	if(window.opener.document.<?php echo $f?>.value==""){
		window.opener.document.<?php echo $f?>.value = getCheckboxItem();
	}
	else{
		window.opener.document.<?php echo $f?>.value += ","+getCheckboxItem();
	}
	alert("成功增加你选中的ID，你可以继续增加");
	//window.opener=true;
  //window.close();
}
</script>
</head>
<body>

<div class="bodytitle">
	<div class="bodytitleleft"></div>
	<div class="bodytitletxt">文档维护</div>
</div>
<table width="96%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="	background:#E2F5BC;">
<tr> 
<td height="24" colspan="9" bgcolor="#EDF9D5">
<strong> §文章列表</strong></td>
</tr>
<tr align="center" bgcolor="#F8FBFB" height="22"> 
<td width="6%">ID</td>
<td width="4%">选择</td>
<td width="40%">文章标题</td>
<td width="20%">录入时间</td>
<td width="20%">类目</td>
<td>图片</td>
</tr>
<form name="form2">
<?php 
$mylist = $dlist->GetDataList();
while($row = $mylist->GetArray('dm'))
{
?>
<tr align='center' bgcolor="#FFFFFF"  onMouseMove="javascript:this.bgColor='#EFEFEF';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22"> 
<td><?php echo $row['ID']?></td>
<td><input name="arcID" type="checkbox" id="arcID" value="<?php echo $row['ID']?>" class="np" /></td>
<td align='left'>
<a href='archives_do.php?aid=<?php echo $row['ID']?>&dopost=editArchives'>
	<u><?php echo $row['title']?></u></a></td>
<td><?php echo GetDateMk($row['uptime'])?></td>
<td><?php echo $row['typename']?></td>
<td><?php echo IsPicArchives($row['litpic'])?></td>
</tr>
<?php 
}
?>
<tr bgcolor="#F8FBFB"> 
<td height="24" colspan="6" style="padding-top:6px">
&nbsp;
<a href="javascript:selAll()" class="inputbutx">全选</a> 
&nbsp;
<a href="javascript:noSelAll()" class="inputbutx">取消</a> 
&nbsp;
<a href="javascript:ReturnValue()" class="inputbutx">把选定值加到列表</a></td>
</tr>
</form>
<tr align="right" bgcolor="#eaf8ce"> 
<td height="20" colspan="6" align="center" bgcolor="#EDF9D5">
	<?php echo $dlist->GetPageList(7);?></td>
</tr>
</table>
<table bgcolor="#FFFFFF" width="96%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr> 
<td height="4"></td>
</tr>
<tr> 
<td height="26" bgcolor="#FFFFFF" style="border: 1px solid #525252;">
<form name='form3'>
<input type='hidden' name='f' value='<?php echo $f; ?>' />
<input type='hidden' name='channelid' value='<?php echo $channelid; ?>' />
<table width='600' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td width='90' align='center'>请选择类目：</td>
    <td width='160'><?php echo $optionarr?> </td>
    <td width='70'> 关键字： </td>
    <td width='160'><input type='text' name='keyword' value='<?php echo $keyword?>' style='width:150' />
    </td>
    <td style="padding-top:6px">
    	<input name="imageField" type="submit" class="inputbut" value="搜索" />
    </td>
  </tr>
</table>
</form>
</td>
</tr>
<tr> 
<td colspan="2" height="4"></td>
</tr>
</table>
</body>
</html>